visit([]).
visit([H | T]):-
    % filter
    0 is mod(H, 2),
    X is H ** 2
    format('Result is : ~w ~n', [X]),
    visit(T).
visit([H | T]):-
    % filter
    1 is mod(H, 2),
    visit(T).